package com.g7.figmaapi.user.controller;

import com.g7.figmaapi.common.result.WebResult;
import com.g7.figmaapi.user.domain.req.UserReqForm;
import com.g7.figmaapi.user.service.UserService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @author: taoxiangqian
 * @explain:
 * @since: 2023/10/30 14:33
 */
@RestController
@RequestMapping(value = "/api/user")
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping(value = "/selectUserById", method = RequestMethod.POST)
    public WebResult test(@RequestBody UserReqForm userReqForm, HttpServletRequest request) {
        return WebResult.success(userService.selectUserById(userReqForm));
    }
}
